package com.eastfair.auth.dto;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.eastfair.annotation.base.SubjectTypeEnum;
import com.eastfair.auth.enumeration.UserAccountStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 用户账户信息
 * </p>
 *
 * @author ligang
 * @since 2021-07-27
 */
@Data
@ApiModel(value = "UserAccountDto", description = "用户信息Dto")
public class UserAccountDto implements Serializable {
    //校验标识
    public interface getByIds {};

    public interface updateById{};


    private static final long serialVersionUID = 1L;

    /**
     * 用户id
     */
    @NotNull(groups = {getByIds.class})
    private List<Long> userIds;

    /**
     * 主键id
     */
    @ApiModelProperty(value = "主键id")
    @NotNull(groups = {updateById.class})
    private Long id;

    /**
     * 用户名
     */
    @ApiModelProperty(value = "用户名")
//    @NotBlank(groups = {updateById.class})
    private String name;

    /**
     * 手机国家区号
     */
    @ApiModelProperty(value = "手机国家区号")
    private String countryCode;

    /**
     * 手机号
     */
    @ApiModelProperty(value = "手机号")
//    @NotBlank(groups = {updateById.class})
    private String mobile;

    /**
     * 邮箱
     */
    @ApiModelProperty(value = "邮箱")
//    @NotBlank(groups = {updateById.class})
    private String email;

    /**
     * 密码
     */
    @ApiModelProperty(value = "密码")
    private String password;


    /**
     * IM密码
     */
    @ApiModelProperty(value = "IM密码")
    private String imPassword;

    /**
     * 状态
     * #{NORMAL:正常;WAIT_INIT:待初始化;FORBIDDEN:禁用;WAITING:待审核;REFUSE:拒绝;DELETE:已删除}
     */
    @ApiModelProperty(value = "状态")
    private UserAccountStatusEnum status;

    /**
     * IP地址
     */
    @ApiModelProperty(value = "IP地址")
    private String ipAddr;

    /**
     * 是否是游客 1是 0否
     */
    @ApiModelProperty(value = "是否是游客 1是 0否")
    private Integer isTourist;

    /**
     * 是否是观众 1是 0否
     */
    @ApiModelProperty(value = "是否是观众 1是 0否")
    @TableField(value = "is_visitor")
    @Excel(name = "是否是观众 1是 0否")
    private Integer isVisitor;

    /**
     * 是否是主办 1是 0否
     */
    @ApiModelProperty(value = "是否是主办 1是 0否")
    @TableField(value = "is_sponsor")
    @Excel(name = "是否是主办 1是 0否")
    private Integer isSponsor;

    /**
     * 是否是展商 1是 0否
     */
    @ApiModelProperty(value = "是否是展商 1是 0否")
    @TableField(value = "is_employee")
    @Excel(name = "是否是员工 1是 0否")
    private Integer isEmployee;

    /**
     * 是否完成完善信息：1是；0否
     */
    @ApiModelProperty(value = "是否完成完善信息：1是；0否")
    private Integer isCompleteInfo;

    /**
     * 是否完成问卷：1是；0否
     */
    @ApiModelProperty(value = "是否完成问卷：1是；0否")
    private Integer isCompleteQuestion;




    /**
     * 项目id（分库分表用）
     */
    @ApiModelProperty(value = "项目id（分库分表用）")
    private Long projectId;

    /**
     * 是否生效(默认1：可用 0:不可用)
     */
    @ApiModelProperty(value = "是否生效(默认1：可用 0:不可用)")
    private Integer enabled;

    /**
     * 是否删除(默认0：未删除 1:已删除)
     */
    @ApiModelProperty(value = "是否删除(默认0：未删除 1:已删除)")
    private Integer deleted;

    /**
     * 验证码id
     */
    @ApiModelProperty(value = "验证码id")
    private String verifyId;

    /**
     * 验证码
     */
    @ApiModelProperty(value = "验证码")
    private String verifyValue;

    /**
     * 公司id
     */
    @ApiModelProperty(value = "公司id")
    @TableField(value = "company_id")
    @Excel(name = "公司id")
    private Long companyId;

    /**
     * 展商id
     */
    @ApiModelProperty(value = "展商id")
    @TableField(value = "exhibitor_id")
    @Excel(name = "展商id")
    private Long exhibitorId;

    /**
     * 观众id
     */
    @ApiModelProperty(value = "观众id")
    @TableField(value = "visitor_id")
    @Excel(name = "观众id")
    private Long visitorId;


    /**
     * 是否是展商 1是 0否
     */
    @ApiModelProperty(value = "是否是展商 1是 0否")
    @TableField(value = "is_actor")
    @Excel(name = "是否是展商 1是 0否")
    private Integer isActor;
    /**
     * 头像
     */
    @ApiModelProperty(value = "头像")
    @Size(max = 255, message = "头像长度不能超过255")
    @TableField(value = "head_img", condition = LIKE)
    @Excel(name = "头像")
    private String headImg;

    /**
     * 昵称
     */
    @ApiModelProperty(value = "昵称")
    @Size(max = 255, message = "昵称长度不能超过255")
    @TableField(value = "nick_name", condition = LIKE)
    @Excel(name = "昵称")
    private String nickName;

    /**
     * 用户类型枚举类
     */
    private SubjectTypeEnum subjectType;
}
